package com.china.springServer.controller;

import com.china.springServer.entity.User;
import com.china.springServer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @fileName: UserController
 * @author: LmR
 * @createDate: 2023/10/22 21:11
 * @Desc:
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/add")
    public void addUser() {
        User user = new User();
        user.setName("杨戬");
        user.setNum(100);
        userService.addUser(user);
    }

}
